import {request} from "@umijs/max";

/** 获取当前的用户 GET /api/currentUser */
export async function getCurrentUserInfo(options?: { [key: string]: any }) {
  return request<{
    data: USER.User;
  }>('/admin/info', {
    method: 'GET',
    ...(options || {}),
  });
}

export async function updatePassword(body: USER.UpdatePasswordParams, options?: { [key: string]: any }) {
  return request<API.ApiResult>('/admin/updatePassword', {
    method: 'POST',
    data: body,
    ...(options || {}),
  });
}
